#include <stdio.h>
main() {
	int i = 0;
	int j = 0;
	int b = 0;
	int c = 1;
	int d = 1;
	int z = 0;
	for (b=1; b <=202420242024; b++) {
		i = 20 * c;
		j = 24 * d;
		if (i < j) {
			c++;
			z = i;
		}
		else if(j<i) {
			d++;
			z = j;
		}
		else if(i==j){
			c++;
			d++;
			z = i;
		}
	}
	printf("%d",z);
	return 0;
}